#! /bin/bash
ls |grep NVIDIA
echo "请输入序号"
read num
sudo ls|grep NVIDIA|awk 'NR=="'$num'"{print $1}'|sudo xargs -i bash {} --no-x-check -a -s
if [nvidia-smi]
then
    reboot
else
    #####todo 检查报错原因
    echo "安装驱动失败"
fi
